import jylcm
import time

from exlcm import example_t
from leaderIP import leaderIP
lc = jylcm.LCM()

msg = example_t()
msg.timestamp = int(time.time() * 1000000)
msg.position = (1, 2, 3)
msg.orientation = (1, 0, 0, 0)
msg.ranges = range(15)
msg.num_ranges = len(msg.ranges)
msg.name = "example string"
msg.enabled = True

IPdata=leaderIP()
IPdata.id=1
IPdata.IP="127.234.5.6"
lc.publish("Leader_MQTT_IP", IPdata.encode())
